<template>
	<view>
		<tantan :list="list" @onChange="change"></tantan>
	</view>
</template>

<script>
	import tantan from "@/components/dgex-tantan/dgex-tantan.vue"
	export default {
		components: {
			tantan
		},
		data() {
			return {
				list: [],
			}
		},
		mounted() {
			const arr = []
			/* 测试数据*/
			const tu = [
				'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg9.51tietu.net%2Fpic%2F2019-091216%2Fiuh0yifksdgiuh0yifksdg.jpg&refer=http%3A%2F%2Fimg9.51tietu.net&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662573014&t=8362e1dbd63b5df009e81722daa685e4',
				'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.win4000.com%2Fmobile%2F2020-06-19%2F5eec5f30c7a71.jpg&refer=http%3A%2F%2Fpic1.win4000.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662573014&t=e46c2e2622713d2a5c4d2a325ab1f08d',
				'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.win4000.com%2Fmobile%2F2018-08-13%2F5b710018b4eb7.jpg&refer=http%3A%2F%2Fpic1.win4000.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662573014&t=9e4d320d3767375fba87e9f63565668d',
				'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg9.51tietu.net%2Fpic%2F2019-091206%2Fdst13psrerwdst13psrerw.jpg&refer=http%3A%2F%2Fimg9.51tietu.net&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662573014&t=40ac6728f2451efed0f0ff34abd20827',
				'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic1.win4000.com%2Fmobile%2F2019-04-22%2F5cbd8defcba7c.jpg&refer=http%3A%2F%2Fpic1.win4000.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662573024&t=393015cda5a08c0d3fad67cc08e4e5fc'
			]
			for (let index = 0; index < 100; index++) {
				const n = Math.floor(Math.random() * (tu.length - 1))
				let data = {
					image: tu[n],
					title: '你好',
					desc: n + 500 + 'm ' + '30分钟前活跃',
					tags: ['射手座']
					// image: tu[index],
				};
				arr.push(data)
			}
			this.list = arr
		},
		methods: {
			change(data) {
				console.log(data);
			}
		}
	}
</script>
<style>
</style>
